Method and apparatus for analog graphics sample clock frequency offset detection and verification

ABSTRACT

A method and apparatus for an analog-to-digital video signal converter. The converter is controlled by a clock with controllable frequency and phase for sampling an analog signal. A circuit corrects the clock frequency using a period of a columnar frame differences as a function of columnar location. The sampling clock frequency is changed by an amount dependent on the period of the columnar differences. A second measure of the difference between successive frames is computed for a sequence of clock phases. The frequency of the clock is verified using a characteristic of the second measure. The characteristic can be the ratio of the maximum to the minimum of the second measure over selected clock phases. Other characteristics can be used such as a difference of a maximum and a minimum measure.

This application claims priority to provisional patent application Ser.No. 60/687,291, filed Jun. 3, 2005, entitled “System and Method forAutolock”, which application is hereby incorporated herein by reference.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application also relates to co-pending and commonly assigned patentapplication Ser. No. 11/355,789, filed concurrently herewith, entitled “Method and Apparatus for Analog Graphics Sample Clock FrequencyVerification.”

TECHNICAL FIELD

This invention relates generally to analog-to-digital conversion fordigital video devices, and in particular, to a method and implementationfor automatically selecting the sampling frequency for an analog videosignal prior to conversion to a digital format.

BACKGROUND

When analog video signals such as R′G′B′(red-green-blue) or Y′P_(b)P_(r)(luma-chroma) video signals of a video graphics source are processed ina digital video processing circuit, such as employed in a digitaltelevision receiver, graphics digitizers that perform analog-to-digitalconversion are utilized to convert the analog signals to a digitalformat. The conversion of a signal including color content from ananalog to a digital format generally utilizes three analog-to-digitalconverters (ADCs), which convert, for example, red, green, and blueanalog signals to digital signals simultaneously. In analog-to-digitalconversion, identifying the correct sampling frequency for the ADCs isessential since even a small error in sampling frequency can impair theresulting displayed images. The phase of the sampling clock foranalog-to-digital conversion is also critical since improper selectionof phase can also create undesirable visible effects. The sampling phaseis the point in time within a sampling clock's cycle for triggering theADC. Thus, when a pixelated display device is driven with analogsignals, particularly analog signals that originate from a digitalsource such as a PC (personal computer), a processing arrangement orcircuit is required to automatically search for the correct samplingfrequency to produce a high quality image. This is necessary becauseanalog signals are generally produced from signals derived from a clockwith frequency that is generally not perfectly synchronized with thefrequency of a local clock controlling the analog-to-digital converters.In addition, a circuit or process may also be required to automaticallysearch for the appropriate sampling phase, as described in co-pendingapplication Ser. No. 11/187,313, filed Jul. 21, 2005, attorney docketnumber TI-39898, which is hereby incorporated herein by reference.

Examples of graphics display devices developed for personal computersand television receivers that can utilize a digital video signal areliquid crystal displays (LCDs) and DLP® image projection systems. LCDsoffer space savings, lower radiation, and lower power consumptioncompared to cathode-ray tube (CRT) monitors which can directly useanalog video inputs. DLP® image projection arrangements enableimplementation of systems displaying a large, high-definition image atreasonable cost. Since an analog display interface is still a widelyused interface between an image source and a display device,particularly in the personal-computer industry, the use of graphicsdigitizers to convert analog signals to digital signals has become avital process for interfacing image sources to digital display devicessuch as LCDs. Commercial devices formed as integrated circuits areavailable to provide analog-to-digital video conversion. Such devicesgenerally contain three ADCs that simultaneously convert red, green, andblue analog video signals to corresponding video signals in a digitalformat.

FIG. 1 illustrates an exemplary block diagram showing interconnection ofsignals in a pixelated video system, for example, a “digital displaysystem.” Pixilated video systems are distinguishable from analog displaysystems such as CRTs by displaying images with fixed pixel locationsthat are formed in a manufacturing process. CRTs display an image over acontinuous surface such as the surface of a CRT, and accordingly can bedriven directly with analog signals.

In the block diagram illustrated in FIG. 1, video or graphics images aregenerated by a video/graphics card 101 such as a video/graphics card ina personal computer. Digital images are converted in this card to analogwaveforms by digital-to-analog converters (DACs) such as DAC 105.Digital signals such as RGB signals in a digital format are supplied tothe DAC from an external source (not shown). The analog waveformsproduced by the digital-to-analog conversion are coupled over line 135to digital signal processing device 102 and converted to a digitalformat by ADC 115. Control circuitry 110 controls the DAC and produceshorizontal and vertical synchronization signals HSYNC and VSYNC that arecoupled to the display device over line 140. In the display device, aclock generation circuit 130, usually implemented with a phase-lockedloop (PLL), generates a sampling clock signal though a phase controlcircuit 120 to control the sampling instant of the ADC and displaycircuitry 125. In such display applications, a key issue for highquality image recovery is accurate determination of both the samplingfrequency and the sampling phase for the ADCs. These two factors have adominant impact on the quality of displayed images.

A phase-locked loop 200 such as illustrated in FIG. 2 is commonly usedto generate the sampling frequency for the ADCs. When a PLL is lockedonto the horizontal synchronization signal (HSYNC), its output can beused as the sampling clock for the ADCs. The dividing ratio of theprogrammable frequency divider 225 is typically controlled by an inputsignal, 227, related to the “number of total pixels per video line” fora given video/graphics mode. Thus, the resulting frequency of thesampling clock is the HSYNC frequency multiplied by the “number of totalpixels per video line.” Ideally, by this mechanism, the sampling clockwill have the same frequency as that of the pixel clock in the videocard. However, this does not occur in practice because the low frequencyHSYNC signal is usually noisy and has significant timing jitter.Furthermore, its frequency may not be accurate. In addition, the pixelclock frequency of the image source such as a video/graphics card mightnot be equal to a specified frequency. As a result, the original imagethat is encoded in the analog signals may not be accurately recovered.Thus, a process to accurately determine the sampling frequency isessential in practical applications to display the high quality imagesdemanded by PC and digital television applications.

In the exemplary block diagram illustrated in FIG. 2, PFD 205 is afrequency and phase detector that converts the frequency or phasedifference of its two inputs to voltage signals. The voltage-controlledoscillator (VCO) 220 is an oscillator with frequency dependent on aninput control voltage. The programmable frequency divider 225 in thefeedback loop divides the VCO frequency to a proportionately lower valuedependant on the dividing ratio signal 227. The charge pump 210 and theloop filter 215 convert and filter the PFD output to a signal level withnoise sufficiently attenuated that it can be utilized as input by theVCO. The output of the VCO (which is the sampling clock of the ADC) islocked to the HSYNC signal through the programmable frequency divider.The dividing ratio of the programmable frequency divider determines theVCO frequency. Ideally, this ratio should be the number of pixels pervideo line. However, the number represented by the “number of pixels pervideo line” is not always consistently used by video sources such asvideo card vendors, and the resulting frequency will not be correct inthose cases, again demonstrating that an improved frequency detectionprocess is required to find the correct dividing ratio so that a highquality image can be displayed.

Eglit, in U.S. Pat. No. 5,847,701 entitled “Method and ApparatusImplemented in a Computer System for Determining the Frequency Used by aGraphics Source for Generating an Analog Display Signal,” datedDecember, 1998, describes searching sampling frequencies usingpredetermined test patterns. Sequences of test patterns are encoded inan analog video source and transmitted to a digital display device wherethe analog signal is converted to sequences of sampled values. Thedigital display device determines whether the sampled values equal oneof the sequences of the test patterns based on a predeterminedconvention. The digital display device changes the sampling frequencyuntil the sampled values equal one of the test pattern sequences, andthe corresponding frequency is used as the ADC sampling frequency when amatch is found. Thus, Eglit in U.S. Pat. No. 5,847,701 requirespredetermined test patterns encoded in an analog video source, which inturn requires additional hardware and software. Unfortunately, displaydevice designers usually do not have control over how the video sourceis configured and how it is designed. Moreover, the operation uses afeedback system which does not specify how the next sampling frequencyshould be determined. The scheme just varies the sampling frequency,which poses a convergence timing problem. Thus, using the methoddescribed by Eglit, a mechanism is still required to efficientlydetermine the next sampling frequency and impractical constraints placedthereby on the display device designer are not resolved.

Nakano, in U.S. Pat. No. 6,097,444 entitled “Automatic Image QualityAdjustment Device Adjusting Phase of Sampling Clock for Analog VideoSignal to Digital Video Signal Conversion,” dated August, 2000,describes choosing the sampling frequency by detecting the HSYNC andVSYNC frequencies and comparing them to the commonly used industrystandard video timing data. The standard video timing mode whose timingdata most closely resembles the detected HSYNC and VSYNC frequencies isthe desired mode. The corresponding pixel frequency is used as thesampling frequency. However, a problem with this scheme is that thepixel frequency specified in industry standards is often used just as aguideline. In real applications, significant frequency deviations occurand a degree of frequency error in the pixel clock is unavoidable, thelatter of which adversely affects image quality.

West, in U.S. Pat. Nos. 5,805,233 and 5,767,916, both entitled “Methodand Apparatus for Automatic Pixel Clock Phase and Frequency Correctionin Analog to Digital Video Signal Conversion,” presents a method ofdetermining a pixel clock sampling frequency using the actual width of avideo image, measured by the number of pixel clock cycles, and comparesit to an expected image width to adjust the pixel clock samplingfrequency. However, the methods described by West depend on the absenceof blanked regions in the video image to produce an accurate pixel clocksampling frequency.

Other approaches to selecting the correct sampling clock frequency use astatic lookup table which involves building a large table that containsall potential clock candidates as well as all the information that isused in the search and identification of the optimum clock candidate.The data in this table would generally include a variety of statisticsabout the analog video source such as horizontal and verticalsynchronization rates, blanking time, active data area, image refreshfrequency, etc.

Table approaches to selecting sampling clock frequency can be a burdento a digital system in several ways. One is cost, because an entiretable of video image characteristics must be stored within the digitalsystem. A second is the time required to search the table to identify anoptimal clock candidate. A third is the need for continuing productsupport for table updates to accommodate new analog graphics sourcesthat may be developed after product development.

Further approaches utilize the image aspect ratio to compute thesampling clock frequency. Some digital systems calculate the samplingclock frequency by scaling the horizontal pixel resolution by a ratio ofthe total horizontal system clock time per video line to the activehorizontal system clock time per video line. This approach works wellwhen the analog video signal has detectable data across the activeportion of the horizontal line and the image is of a known aspect ratio,such as an aspect ratio of 4:3. But in recent years, various “wide-mode”analog graphics sources have appeared. These sources can have variousimage aspect ratios such as 16:9, 16:10, etc., and sometimes the imageaspect ratios are unpredictable. Since there is no way to determinebeforehand the image aspect ratio reliably, this method cannot handlethe present and expected range of wide-mode analog graphics signals.

In order to correctly adjust the sample clock frequency using the timingratio described above, useful image data must be present across theactive video region. When there is no data at the left or right bordersof the image, for example, when the image contains “black borders,” suchas the black borders 404 and 405 as shown in FIG. 4, the actual systemclock measurement will be incorrect, and the sampling clock frequencywill not be calculated correctly. In FIG. 4, a video image 400 isillustrated with an active region including black borders 404 and 405 onthe left and right sides, respectively, of a detected active region 406.

The main limitations of the prior art circuits are thus imprecise,unreliable, or impractical determination of the sampling frequency forreconstruction of an image for a digital display device. Prior artapproaches use processes that employ test patterns or image data tables,rely on imprecise clocks for digital to-analog conversion, compute withnoisy data, rely on the absence of blanked areas on the sides of theimage, and depend on signals with substantial overshoot and undershoot.A need thus exists for an apparatus and method to accurately determinethe sampling frequency and to select a reliable sampling phase so that adigital image can be displayed that is not degraded by theselimitations.

SUMMARY OF THE INVENTION

Embodiments of the present invention achieve technical advantages as avideo signal conversion device that receives an analog signalrepresenting an image formed of pixels in video lines and produces adigital signal representative of the video image. Video lines include anactive video region, and may include pixels representing blanked regionson the sides of the image. An analog-to-digital converter, coupled to aclock with controllable frequency, receives the analog signal andconverts it into the digital signal. The clock controls the samplingpoints of the analog signal for the analog-to-digital converter.

In a preferred embodiment, a circuit corrects the clock frequency usinga period of a measure of the difference between successive frames takenin a columnar region of the video image. The measure is a function thatis dependent on the location of the columnar region.

In a preferred embodiment, the measure of the difference betweensuccessive frames is a count, taken over pixels in a columnar region atleast one column wide of the video image, of the magnitude of thedifference between a digitized pixel value in one frame and thecorresponding digitized pixel value in a following frame. The count istaken for the magnitude of the difference exceeding a threshold value.In a further preferred embodiment, the measure of the difference istaken for columnar regions comprising a plurality of columns.

In a preferred embodiment, the clock frequency is corrected byincreasing or decreasing the clock frequency by an amount dependent onthe period of the measure as a function of columnar location.

In a further preferred embodiment, the clock has selectable phase, andthe video signal conversion device further comprises a circuit tocompute, for each phase in a sequence of selected phases for the clock,a second measure as the difference between successive frames of thevideo image, using the digital signal. The frequency of the clock isverified using a characteristic of the second measure of the differencebetween successive frames.

In a preferred embodiment, the characteristic is the ratio of themaximum of the second measure to the minimum of the second measure overthe sequence of selected phases. In a preferred embodiment, the secondmeasure of the difference between successive frames is a count, takenover pixels, of the magnitude of the difference between a digitizedpixel value in one frame and the corresponding digitized pixel value ina following frame. In a preferred embodiment, the count is taken of thenumber of times the magnitude exceeds a threshold value. In a preferredembodiment, the circuit for verifying the frequency of the clockcompares the characteristic to a threshold value. In a preferredembodiment, the sequence of selected phases for the clock is a sequenceof regularly spaced phases.

Another embodiment of the present invention is a method of constructinga video signal conversion device to receive an analog signal of a videoimage formed as a sequence of frames of video lines of pixels, and toproduce a digital signal representative of the video image. In apreferred embodiment, video lines include an active video region, whichmay include pixels representing blanked regions on the sides of theimage. The method includes coupling an analog-to-digital converter forreceiving the analog signal to a clock with controllable frequency,sampling the analog signal at sampling points controlled by the clockfor conversion into the digital signal, computing a measure for thedigital signal of the difference between successive frames of the videoimage in a columnar region at least one column wide, observing a periodof the measure as a function of columnar region location, and correctingthe clock frequency using the period of the measure as a function ofcolumnar location.

In a preferred embodiment, the method includes computing the measure forthe digital signal of the difference between successive frames of thevideo image in columnar regions at least one column wide.

In a preferred embodiment, the method includes computing a count, takenover pixels in a columnar region, of the magnitude of the differencebetween a digitized pixel value in one frame and the correspondingdigitized pixel value in a following frame, for the magnitude exceedinga threshold value. In a further preferred embodiment, the methodincludes taking the count for columnar regions comprising a plurality ofcolumns.

In a preferred embodiment, correcting the clock frequency comprisesincreasing or decreasing the clock frequency by an amount dependent onthe period of the measure as a function of columnar location.

In a further preferred embodiment, the method includes using a clockwith a selectable phase. The method further includes computing, for eachphase in a sequence of selected phases for the clock, a second measureas the difference between successive frames of the video image, usingthe digital signal; and verifying the frequency of the clock using acharacteristic of the second measure of the difference betweensuccessive frames.

In a preferred embodiment, the method includes using the ratio of themaximum of the second measure to the minimum of the second measure overthe sequence of selected phases for the characteristic.

In a preferred embodiment, the method includes, for computing the secondmeasure of the difference between successive frames, using a count,taken over pixels, of the magnitude of the difference between adigitized pixel value in one frame and the corresponding digitized pixelvalue in a following frame. In a preferred embodiment, the count istaken of the number of times the magnitude exceeds a threshold value.

In a preferred embodiment, the method includes verifying the frequencyof the clock by comparing the characteristic to a threshold value.

In a preferred embodiment, the method includes using a sequence ofregularly spaced phases for the sequence of selected phases

Embodiments of the invention solve the problem of accurately convertingan analog signal representing a video image formed as a sequence offrames of video lines of pixels into a digital signal representative ofthe video image. The required sampling frequency for theanalog-to-digital converter is corrected and verified by using acharacteristic of a measure of the difference between successive frames.

Embodiments of the present invention advantageously provide a videosignal conversion device and method that can convert from analog signalsinto a digital format with high quality, and without the need toaccurately predefine the properties of the video signal, or to excludeimages with a blanked area on an image side.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention, and theadvantages thereof, reference is now made to the following descriptionstaken in conjunction with the accompanying drawings, in which:

FIG. 1 illustrates an exemplary block diagram of the prior art showingthe interconnection of signals in a pixelated display system;

FIG. 2 illustrates a phase-locked loop of the prior art;

FIG. 3 illustrates an analog-to-digital converter controlled by aprocess of an embodiment of the present invention;

FIG. 4 illustrates an video image containing an active video region withblack borders;

FIG. 5 illustrates a nominal waveform of a video signal;

FIG. 6 illustrates a nominal waveform of a video signal containing blackborders on the left and right sides of the image;

FIG. 7 illustrates an analog graphics signal derived from a digitalsource and a series of sampling clock waveforms, each sampling clocksynchronized with the pixel frequency, with a sequence of sampling clockphases;

FIG. 8 illustrates a typical analog graphics signal, showing ringing,overshoot, and undershoot;

FIG. 9 illustrates an analog graphics signal derived from a digitalsource and a sampling clock waveform with sampling clock frequencyunsynchronized to the pixel frequency;

FIG. 10 illustrates a summed inter-frame pixel error plot vs. samplingclock phase with synchronized sampling clock frequency, of an embodimentof the present invention;

FIG. 11 illustrates a summed inter-frame pixel error plot vs. samplingclock phase with unsynchronized sampling clock frequency, of anembodiment of the present invention;

FIGS. 12A and 12B illustrates further examples of plots of summed pixelerror vs. sampling clock phase for synchronized and unsynchronizedsampling clock frequency, of an embodiment of the present invention;

FIG. 13 illustrates a plot of summed pixel error column by column in avideo image with unsynchronized sampling clock frequency, of anembodiment of the present invention; and

FIG. 14 illustrates a plot showing capturing pixel error data acrossthree columns of a video image, of an embodiment of the presentinvention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The making and using of presently preferred embodiments are discussed indetail below. It should be appreciated, however, that the inventionprovides many applicable inventive concepts that can be embodied in awide variety of specific contexts. The specific embodiments discussedare merely illustrative of specific ways to make and use the invention,and do not limit the scope of the invention.

Embodiments of the invention will be described with respect to preferredembodiments in a specific context, namely an apparatus and method forselecting the sampling frequency for an analog video signal forconversion to a digital format. For the digital video source to be atrue representation of the analog video source, the analog-to-digitalconverter must use the correct sampling clock frequency and anappropriately selected phase of the sampling clock. To insure thecorrect sampling clock frequency for an analog video source, embodimentscomprise a process that computes for selected sampling clock phases aframe difference count of the magnitude of pixel-by-pixel differencesexceeding a threshold, representing a measure of a difference betweensuccessive frames. Embodiments further comprise a process to select asampling clock frequency for the analog-to-digital converter byselecting a frequency that produces a characteristic behavior of framedifference, as sampling clock phase is varied, of the count of themagnitude of pixel-by-pixel differences between successive framesexceeding a threshold, representing a frame difference between thesuccessive frames. Other measures for frame-to-frame difference may alsobe used as described hereinbelow. Further embodiments comprise a processto determine the sampling frequency for an analog-to-digital converterby controlling the dividing ratio of a programmable frequency dividercontrolling a sampling clock frequency so that a count of the magnitudeof pixel-by-pixel differences between successive frames exceeding athreshold, representing a frame difference between successive frames,illustrates a characteristic appearance as sampling phase is varied. Ofcourse, other measures of frame-to-frame difference may also be used tocontrol the dividing ratio of a programmable frequency divider.

FIG. 3 illustrates an analog-to-digital converter 305 controlled by aprocess or method of the present invention. Input signal 340 representsan analog video input signal generated by a digital system such as a PCor a digital television receiver. The analog-to-digital converter 305produces a sampled digital output signal 350 representing the videoimage. The analog-to-digital converter 305 samples the input signal 340at sampling times controlled by the sampling clock 310. The samplingtimes for the analog-to-digital converter are typically controlled bylow-to-high transitions of the clock waveform in a practical circuit.The signal characteristic assessment block 320 computes a characteristicof the digital signal 350 such as by assessing a count of the magnitudeof pixel differences between successive video frames exceeding athreshold. The block 320 selectively controls a sequence of phases ofclock 310 to make the signal characteristic assessment. The result ofthe assessment may be an adjustment to or change in the clock frequencyperformed in the block 330. Particular elements of the processillustrated in FIG. 3 will be described in further detail in explanatorymaterial following hereinbelow.

FIG. 5 illustrates a typical waveform of a video signal. Pixels in theactive video region depict information that can be seen by viewers.Thus, any error in the number of active pixels per video line will beapparent to a viewer. This number is determined by the definition of thegiven image format, including the image refresh rate. The correctsampling clock frequency in the display device produces the correctnumber of active pixels per video line in the active video region. Thecorrect sampling clock frequency ideally should precisely equal thepixel clock frequency of a video source such as a video/graphics card.

The video image signal illustrated in FIG. 5 can represent various imageaspect ratios such as 4:3, 16:9, or 16:10. The number of active videopixels in the active video region depends on the aspect ratio. Thus, theparticular number of active pixels per line, which affects the pixelclock frequency, can generally not be assumed to be known beforehand.For example, a video image with one image aspect ratio could be formedwith 1280 pixels, while another could be formed with be 1024 pixels, or1366, etc. The XGA video standard may require a 65 MHz pixel clock,whereas the wide XGA video standard (WXGA) may require a higher pixelclock frequency such as a 75 MHz clock. A candidate clock frequency canbe tested using the method of the invention, which allows differentpossible pixel clock frequencies to be used and synchronized.

The pixel clock frequency is generally not transmitted from a videosource to a video signal processing device as illustrated in FIG. 1. Forexample, for an 800×600 display format, i.e., for a video imagecontaining 600 horizontal lines and 800 pixels in each horizontal line,precisely 800 pixels should be correctly displayed in a horizontal line.A signal containing a synchronization waveform component may besuperimposed onto the analog signal waveform representing the image asillustrated in FIG. 5.

FIG. 6 illustrates a typical waveform of a video signal including blackborders on the left and right edges of the image. Black borders aregenerally at the same signal level as the blanking level. Consequently,as illustrated in the figure, the apparent active video region isnarrower than the true active video region, which would produce aninaccurate pixel count for a system attempting to measure the activevideo region. As an example, for Windows™-based PC applications, usersmay use some kind of screen background with substantial regions on theleft and right sides of the image with black backgrounds. Examples suchas these can produce an inaccurate pixel count, particularly whenapplications are run on a background with substantial black areas on theside of an image.

FIG. 7 illustrates a portion of an active video analog graphics signal701 originating from a digital video source. As represented by FIG. 7,the RGB values of pixels in the active video region would typically besignificantly different from those in the front and back porch regionswhere the RGB values are at the blank (or black) level. The signalincludes stable pixel areas, such as pixel area 705, and transitionpixel areas, such as transition pixel area 706 that lie between pixelsin the original image. Ideally, the analog graphics signal would besampled near the middle of the stable pixel areas, such as at samplingpoint 707. A sequence of sampling clock waveforms, 702, 703, and 704,representing clock phases 0, 1, and N are illustrated. In a videosystem, the number of phases N is frequently 32. In a typical system thesampling time for the analog graphics signal occurs at the rising edgeof the sampling clock waveform. For the sampling clock waveform 702illustrated in the figure, this waveform has the correct samplingfrequency and a proper sampling phase for the analog graphics signal701. A sampling clock waveform (not shown) with phase lying roughlymidway between phase 0 and phase N, which would sample the analoggraphics signal 701 near the transition pixel areas, which are regionsof the waveform with substantial amplitude uncertainty, will generallyproduce a sampled signal with inaccurate signal amplitudes because thesampled points will not align with pixels in the original image.

In general, the best sampling points produce an image that bestresembles the original image. Good sampling points are at intervals oftime where the waveforms are flat and the signals “settle down.”Overshoot and undershoot areas occur where the video signal is still intransition, and sampling should be avoided.

In reality the “flat” areas of the analog video waveform are not as welldeveloped as those shown in FIG. 7, and generally exhibit someovershoot, undershoot, and ringing such as illustrated in FIG. 8. Theslope of the transitions between the pixel areas depends on thebandwidth of components in the signal processing chain. The relativelyvertical transition areas in this figure indicate a wide bandwidthsystem.

FIG. 9 again illustrates the analog graphics signal 701. The stable andtransitional pixel areas, 705 and 706, are as previously described withreference to FIG. 7, and sampling time or (times) 901 is an exemplarysampling time aligned with a rising edge of the sampling clock waveform.The frequency of the sampling clock waveforms illustrated in FIG. 9 isnow not synchronized with the frequency of the pixels in the waveform701. When the sampling clock frequency is not synchronized with thepixel frequency, no sampling clock phase can be selected to accuratelyreproduce the amplitude of all the pixels in the waveform 701 asillustrated in the figure.

The method and apparatus of the invention employ a signal processingtechnique called frame differencing to overcome limitations ofdetermining sampling clock frequency described previously above withreference to the prior art. Frame differencing employs a measure of thedifference between successive video frames to assess the accuracy of thesampling clock frequency.

In a frame differencing operation of the invention, two successiveframes of a video image are stored. Preferably, the successive framesare immediately adjacent in time without an intervening frame. Theabsolute value of the pixel intensity difference at the same framelocation (pixel location) is computed between the two frame with. Acount of frame pixel differences, (or “accumulated error”),frame_difference_count, for these two frames is calculated by taking theabsolute value of the difference of signal values for pixel locations,preferably for active pixel locations, and comparing the absolute valueto a pixel-difference threshold. In the exemplary embodiment, if theabsolute value of the difference exceeds the pixel-difference threshold,the frame_difference_count is incremented until the end of the frame isreached (or until selected pixels have been summed):

frame_difference_count = 0 For every active row For every active column If (( | Frame₁_Pixel(column,row) − Frame₂_Pixel(column,row) | ) >pixel_difference_threshold ) Then increment the frame_difference_count(preferably by one) End column End row

An active row is a row containing pixels with signal amplitude differentfrom the black (blanking) level. This calculation computes the count offrame differences for one phase setting of the current pixel clockfrequency in the video analog-to-digital converter. Most current videoanalog-to-digital converters, as indicated above, allow 32 phaseselections of the clock frequency. Each phase selection is 1/32 of a360° rotation of the clock sampling period. A count of the absolutevalue of the pixel intensity difference for any pixel intensitydifference above a certain threshold for the whole frame is thusaccumulated. Exemplary values for the pixel_difference_threshold are4-8, but a value of 0 could also be used. The calculation is repeatedfor other phases of the sampling clock. The calculation need not beperformed for every pixel in a frame as described further later below.

Several characteristics of a frame difference function are used tofacilitate sampling clock verification and adjustment. Onecharacteristic is a plot of frame_difference_count vs. sampling clockphase, which shows a markedly different appearance for correct andincorrect sampling clock frequencies. At the correct sampling clockfrequency, a plot of frame_difference_count (“accumulated error”) vs.phase produces a “bowl” shape distribution as illustrated in FIG. 10. Atincorrect sampling clock frequencies, the plot is “substantially flat”as illustrated in FIG. 11. This characteristic of frame_difference_countvs. phase can be used as a tool for clock frequency verification.

FIGS. 12A and 12B illustrate further examples of characteristic graphsof frame_difference_count plotted against sampling clock phase. The plotin FIG. 12A illustrates correct sampling clock frequency. The plot inFIG. 12B illustrates incorrect sampling clock frequency. These plotswere produced using a higher threshold value for thepixel_difference_threshold (using a threshold value of 8), and throwingaway the three least significant bits of 10-bit pixels representing onecolor of a 1024-by-768 pixel image.

In general, for plots such as those illustrated in FIGS. 10, 11, 12A,and 12B, the scale on the vertical axis depends on the number of pixelsin the image, the particular measure used to assess frame-to-framedifferences, the number of bits in a pixel element, and the relativerate of change in the sequence of video images. The scales used in thesefigures are intended to represent one exemplary embodiment of themethod.

Clock frequency verification can be achieved in a simplified embodimentof the invention by analyzing only a subset of sampling clock phases,preferably equally spaced phases, which can substantially reduce thetime required to verify the sampling clock frequency over sampling withevery phase. This simplification can allow a wide range of clockfrequencies to be tested quickly.

The simplification of using only a subset of equally spaced clocksampling phases forms the basis of clock frequency verification calledCoarse Phase Analysis (CPA). A preferred implementation of CPA can bedescribed functionally as follows:

Select the number of phases (num_phase) to be used in the CPA, (e.g.,4-32 phases)

Select a verification threshold (v_th), (e.g., 5-10) and

Loop num_phase times:

-   -   adjust the ADC phase, preferably by equal increments    -   run the frame pixel difference comparison computation to collect        an error count

End loop.

Determine the ratio of the maximum frame_difference_count to the minimumframe_difference_count for the selected sampling clock phases:

$\begin{matrix}{{CPA\_ ratio} = \frac{{Max}\left( {{frame\_ difference}{\_ count}} \right)}{{Min}\left( {{frame\_ difference}{\_ count}} \right)}} & (1)\end{matrix}$

If CPA_ratio>v_th

Then: current sampling clock frequency is correct;

Else: current sampling clock frequency is incorrect.

Although equation (1) indicates computing a characteristic which is aratio of a maximum frame_difference_count to a minimumframe_difference_count, alternative characteristic functions can be usedwithin the broad scope of the invention, such as, without limitation, adifference between a maximum frame_difference_count and a minimumframe_difference_count, and the inverse of the ratio indicated byequation 1.

When the current sampling clock frequency is different from the correctsampling clock, error count data computed column by column shows aperiodic pattern against column location as illustrated in FIG. 13, witha period of T_(error) _(—) _(count). The columnar error count may alsobe calculated by only computing the frame_difference_count acrosscolumns in active areas of the image.

The period of this pattern is related to the clock offset by thefollowing equation:

$\begin{matrix}{{{clock\_ offset} = {{current\_ clock} \cdot \left( \frac{1}{T_{error\_ count}} \right)}},} & (2)\end{matrix}$and the new sample clock is:sample_clock=current_clock_clock_offset.   (3)

Based on equation (2) above, by determining the error count periodT_(error) _(—) _(count), the clock frequency can be increased ordecreased by the clock_offset. This observation forms the basis for anenhancement of the process for determining the correct clock samplingfrequency in a further embodiment of the invention called Clock OffsetDetection (COD).

An implementation of COD can be described as follows:

-   -   i. Use video framing information to determine a possible initial        pixel resolution (such as XGA, SVGA, etc.);    -   ii. Obtain an initial clock frequency estimate based on the        assumed resolution (such as from a table);    -   iii. Use a search (e.g., a binary search) for a region with a        high error count;    -   iv. Compute the error count, preferably in a two pixel-wide        column across this region (other column widths can be used);    -   v. Determine the error count period T_(error) _(—) _(count)        based on the computed data;    -   vi. Compute the clock offset (clock_set) based on equation (2).        (Note that the sign of the offset correction is not determined        by the error count period T_(error) _(—) _(count));    -   vii. Reduce the clock period by the amount of the offset;    -   viii. Repeat steps iv-vi using the new clock period;    -   ix. If the new error count period is smaller than the period        calculated from step v, then the clock needs to be adjusted in        the opposite direction (i.e., increase the clock period by the        amount of the offset because the sign of the error was not        known).    -   x. Terminate the algorithm if:        -   a. The new clock offset value (clock_offset) is less than a            pre-defined threshold th_(—offset). (For example, since all            VESA compliant sources have clocks divisible by 8, the            algorithm can set th_(—offset)=4, and round the final clock            to the nearest value divisible by 8.);        -   b. A pre-defined number of iterations has been reached.

Steps viii and ix enable the correct handling of sampling clockfrequency of any wide-mode analog source, including wide-mode analogsources with sampling clock frequencies not contained in a table.

FIG. 14 illustrates capturing inter-frame pixel error count data columnby column across three columns, starting at a first column, identifiedon the figure as column 299, and ending at a later column, identified onthe figure as column 301.

In an implementation of the process to select the correct sampling clockfrequency, a combination of CPA and COD is used to achieve adaptation toa wide range of input graphics sources and to ensure adequately fastfrequency locking time.

A combined method using both CPA and COD can be performed using threesteps:

-   -   i. CPA: In this step, the ADC sampling frequency is sequentially        adjusted to several pre-defined sampling clock frequencies. CPA        is run against each of these clock frequencies. If any sampling        clock frequency has a CPA-ratio over a threshold, this clock        will be regarded as the correct sampling clock. Steps ii and iii        below will then be bypassed.    -   ii. COD: In this step the frame difference error count data is        analyzed, and the clock is adjusted based on the clock offset        computed from equation (2).    -   iii. POST-CPA: CPA is run against clocks within a certain        percentage range of the sampling clock frequency computed from        step ii, and the clock with highest CPA ratio is identified. If        the ratio is also over the pre-defined threshold, this clock        frequency is selected as the correct sampling clock frequency.        Otherwise, the process is repeated, beginning at step ii.

The steps of an embodiment of the invention as described above utilize aratio of the maximum frame_difference_count divided by the minimumframe_difference_count to produce a characteristic plot against samplingclock phase to assess synchronization of the sampling clock frequencyand to adjust sampling clock frequency. In further embodiments of theinvention, other measures of a video frame difference plotted againstclock phase or column location can be used to assess or adjust samplingclock frequency. For example, measures such as a reciprocal of the ratiodescribed above, or other measures such as general statistical measuresof frame differences, including general measures based on pixeldifferences, variances of differences, etc., can also be used to producea plot with a detectable characteristic to characterize or adjustsampling clock frequency.

Following are some examples, without limitation, of other metrics thatare alternatives to the frame_difference_count described above that canbe used to measure the difference between successive frames, within thebroad scope of the invention.

Denote frame 1 as X, and its pixels as x_(mn), and frame 2 as Y, and itspixels as y_(mn). Use indexes m=1, 2, 3, . . . , M, and n=1, 2, 3, . . .,N, to indicate horizontal and vertical pixel coordinates, respectively.The following represent exemplary alternatives for a measure of thedifference between successive frames X and Y:

Euclidean Distance or Squared Sum of Distance (SSD):

$d_{e} = \sqrt{\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}\left( {x_{mn} - y_{mn}} \right)^{2}}}$

City Block Distance or Sum of Absolute Distance (SAD):

$d_{cb} = {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}{{x_{mn} - y_{mn}}}}}$A variation of SAD as previously described above is the threshold-basedSAD wherein:

$d_{cbth} = {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}{f_{th}\left( {{x_{mn} - y_{mn}}} \right)}}}$using the function f_(th) for a threshold th defined as:

${f_{th}(x)} = \left\{ \begin{matrix}{1,} & {x > {th}} \\{0,} & {x < {th}}\end{matrix} \right.$The variation of SAD can be described as a variation of the Hammingdistance.

Canberra Distance:

$d_{ca} = {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}\frac{{x_{mn} - y_{mn}}}{x_{mn} + y_{mn}}}}$

Squared Chord Distance:

$d_{sc} = {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}\left( {\sqrt{x_{mn}} - \sqrt{y_{mn}}} \right)^{2}}}$

Chi-Squared Distance:

$d_{scs} = {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}\frac{\left( {x_{mn} - y_{mn}} \right)^{2}}{x_{mn} + y_{mn}}}}$

Cosine Distance:

$d_{\cos} = {1 - \frac{\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}{x_{mn}y_{mn}}}}{\sqrt{\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}{x_{mn}^{2}{\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}y_{mn}^{2}}}}}}}}$yshev Distance:d _(cs)=max_(m,n)(|x_(mn) −y _(mn)|)

An improvement of this process for determining pixel clock frequencyover the prior art is the absence of a need for an accurate, underlyingimage aspect ratio or other image parameters such as refresh rate. If anassumed image aspect ratio is incorrect, the process is self correcting.Another improvement is the requirement for the image to have only someregion with useful image detail, and not requiring active video dataacross the whole active region. A further improvement is not requiringall sources to have the same or a predictable aspect ratio. Therefore,it can handle wide-mode analog graphics sources with a variety of aspectratios, including unpredicted aspect ratios, which are not easilyhandled with existing methods. Since the process does not require datato be filled across the whole active area, it can handle images withblack borders, which existing methods handle with difficulty. And sincethe process does not require an update of a static look-up table when anew source format emerges, it requires minimal maintenance effort.

Although embodiments of the present invention and its advantages havebeen described in detail, it should be understood that various changes,substitutions and alterations can be made herein without departing fromthe spirit and scope of the invention as defined by the appended claims.For example, it will be readily understood by those skilled in the artthat the methods and utilization of techniques to form the processes andsystems providing accurate image sampling as described herein may bevaried while remaining within the broad scope of the present invention.It will be further understood by those skilled in the art that othervideo signal representations such as YUV and gray-scale representationscan be substituted for RGB video signal representations in processesdescribed hereinabove with accommodations as necessary within the broadscope of the invention.

Moreover, the scope of the present application is not intended to belimited to the particular embodiments of the process, machine,manufacture, composition of matter, means, methods and steps describedin the specification. As one of ordinary skill in the art will readilyappreciate from the disclosure of the present invention, processes,machines, manufacture, compositions of matter, means, methods, or steps,presently existing or later to be developed, that perform substantiallythe same function or achieve substantially the same result as thecorresponding embodiments described herein may be utilized according tothe present invention. Accordingly, the appended claims are intended toinclude within their scope such processes, machines, manufacture,compositions of matter, means, methods, or steps.

1. A video signal conversion device constructed to receive an analogsignal of a video image formed as a sequence of frames of video lines ofpixels, and to produce a digital signal representative of the videoimage, comprising: a clock with a selectable phase and a controllablefrequency for controlling the sampling points of the analog signal; ananalog-to-digital converter, coupled to the clock, for receiving theanalog signal and converting it at sampling points controlled by theclock into the digital signal: a correction circuit that corrects theclock frequency using a period of a measure of the difference betweensuccessive frames taken in a columnar region of the video image, whereinthe measure is a function that is dependent on columnar region location;a computation circuit to compute, for each phase in a sequence ofselected phases for the clock, a second measure of the differencebetween successive frames of the video image, using the digital signal;and a verification circuit to verify the frequency of the clock using acharacteristic of the second measure of the difference betweensuccessive frames, wherein the characteristic is the ratio of themaximum of the second measure over the sequence of selected phases tothe minimum of the second measure over the sequence of selected phases.2. The video signal conversion device according to claim 1, wherein themeasure of the difference between successive frames is a count, takenover pixels in a columnar region at least one column wide of the videoimage, of the magnitude of the difference between a digitized pixelvalue in one frame and the corresponding digitized pixel value in afollowing frame, for the magnitude exceeding a threshold value.
 3. Thevideo signal conversion device according to claim 1, wherein the measureof the difference between successive frames taken in columnar regions atleast one column wide of the video image is taken for columnar regionscomprising a plurality of columns.
 4. The video signal conversion deviceaccording to claim 1, wherein the clock frequency is corrected byincreasing the clock frequency by an amount dependent on the period ofthe measure as a function of columnar location.
 5. The video signalconversion device according to claim 1, wherein the second measure ofthe difference between successive frames is a count, taken over pixels,of the magnitude of the difference between a digitized pixel value inone frame and the corresponding digitized pixel value in a followingframe, for the magnitude exceeding a threshold value.
 6. The videosignal conversion device according to claim 1, wherein the verificationcircuit to verify the frequency of the clock compares the characteristicto a threshold value.
 7. The video signal conversion device according toclaim 1, wherein the sequence of selected phases is a sequence ofregularly spaced phases.
 8. A method of converting an analog videosignal of a video image formed as a sequence of frames of video lines ofpixels into a digital video signal, the method comprising: coupling ananalog-to-digital converter for receiving the analog signal to a clockwith controllable frequency; sampling the analog signal at samplingpoints controlled by the clock for conversion into the digital signal;computing a measure for the digital signal of the difference betweensuccessive frames of the video image in a columnar region at least onecolumn wide; observing a period of the measure as a function of columnarlocation; correcting the clock frequency using the period of the measureas a function of columnar location; computing, for each phase in asequence of selected phases for the clock, a second measure of thedifference between successive frames of the video image, using thedigital signal; and verifying the frequency of the clock using a ratioof the maximum of the second measure over the sequence of selectedphases to the minimum of the second measure over the sequence ofselected phases between successive frames.
 9. The method according toclaim 8, wherein computing the measure for the digital signal of thedifference between successive frames of the video image in columnarregions at least one column wide comprises computing a count, taken overpixels in a columnar region, of the magnitude of the difference betweena digitized pixel value in one frame and the corresponding digitizedpixel value in a following frame, for the magnitude exceeding athreshold value.
 10. The method according to claim 8, wherein taking thecount in columnar regions at least one column wide comprises taking thecount for columnar regions comprising a plurality of columns.
 11. Themethod according to claim 8, wherein correcting the clock frequencycomprises increasing the clock frequency by an amount dependent on theperiod of the measure as a function of columnar location.
 12. The methodaccording to claim 8, including using a count, taken over pixels, of themagnitude of the difference between a digitized pixel value in one frameand the corresponding digitized pixel value in a following frame, forthe magnitude exceeding a threshold value, for the second measure of thedifference between successive frames.
 13. The method according to claim8, including verifying the frequency of the clock by comparing thecharacteristic to a threshold value.
 14. The method according to claim8, including using a sequence of regularly spaced phases for thesequence of selected phases.
 15. A digital display device comprising avideo signal conversion circuit constructed to receive an analog signalof a video image formed as a sequence of frames of video lines ofpixels, and to produce a digital signal representative of the videoimage, comprising: a clock with a selectable phase and a controllablefrequency for controlling the sampling points of the analog signal; ananalog-to-digital converter, coupled to the clock, for receiving theanalog signal and converting it at sampling points controlled by theclock into the digital signal; a correction circuit that corrects theclock frequency using a period of a measure of the difference betweensuccessive frames taken in a columnar region of the video image, whereinthe measure is a function that is dependent on columnar region location;and a circuit: to compute, for each phase in a sequence of selectedphases for the clock, a second measure of the difference betweensuccessive frames of the video image, using the digital signal; and toverify the frequency of the clock using a ratio of the maximum of thesecond measure over the sequence of selected phases to the minimum ofthe second measure over the sequence of selected phases of thedifference between successive frames.
 16. The digital display deviceaccording to claim 15, wherein the measure of the difference betweensuccessive frames is a count, taken over pixels in a columnar region atleast one column wide of the video image, of the magnitude of thedifference between a digitized pixel value in one frame and thecorresponding digitized pixel value in a following frame, for themagnitude exceeding a threshold value.
 17. The digital display deviceaccording to claim 15, wherein the measure of the difference betweensuccessive frames taken in columnar regions at least one column wide ofthe video image is taken for columnar regions comprising a plurality ofcolumns.
 18. The digital display device according to claim 15, whereinthe clock frequency is corrected by increasing the clock frequency by anamount dependent on the period of the measure as a function of columnarlocation.
 19. The digital display device according to claim 15, whereinthe second measure of the difference between successive frames is acount, taken over pixels, of the magnitude of the difference between adigitized pixel value in one frame and the corresponding digitized pixelvalue in a following frame, for the magnitude exceeding a thresholdvalue.
 20. The digital display device according to claim 15, wherein thecircuit for verifying the frequency of the clock compares thecharacteristic to a threshold value.
 21. The digital display deviceaccording to claim 15, wherein the sequence of selected phases is asequence of regularly spaced phases.